{
 "cells": [
  {
   "cell_type": "markdown",
   "id": "604af2ef",
   "metadata": {},
   "source": [
    "* 日期：2023-09-11\n",
    "* 课程：python\n",
    "* 记录人：卢静仪\n",
    "* week02\n",
    "--------\n",
    "#  week02-python编译环境入门\n",
    "\n",
    "## 1. Anaconda安装注意\n",
    "\n",
    "> 1. 系统变量与环境变量认知\n",
    "> 2. Anaconda安装成功标志；在cmd中输入conda显示如下图片；\n",
    "\n",
    "## 2. 编译环境理解\n",
    "\n",
    "> 1. cmd中运行python，shell脚本测试code\n",
    "> 2. IDLE:python自带的纯python集成开发环境\n",
    "> 3. 数据科学、交互式集成开发环境jupyter notebook\n",
    "\n",
    "## 3.  如何在电脑中运行jupyter notebook\n",
    "\n",
    "> 1. 打开cmd\n",
    "> 2. 进入自己选择的硬盘，例如：d： 进入D盘\n",
    "> 3. 输入jupyter notebook即可选择浏览器打开\n",
    "\n",
    "##  4.  jupyter notebook注意事项\n",
    "\n",
    "> 1. 不小心关闭浏览器，在cmd找到链接\n",
    "> 2. 不小心关了cmd， <font style=\"color:pink\">**不要慌**</font> ,重新打开cmd"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "id": "63c73e26",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "hello jupyter notebook!\n"
     ]
    }
   ],
   "source": [
    "print(\"hello jupyter notebook!\")"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "5d4e51c9",
   "metadata": {},
   "source": [
    "# 2.时间"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "id": "0838e0ab",
   "metadata": {},
   "outputs": [],
   "source": [
    "import time"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "id": "02d89229",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "time.struct_time(tm_year=2023, tm_mon=9, tm_mday=11, tm_hour=20, tm_min=56, tm_sec=36, tm_wday=0, tm_yday=254, tm_isdst=0)"
      ]
     },
     "execution_count": 3,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "time.localtime()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "id": "89a45ef4",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "53.73024715327899"
      ]
     },
     "execution_count": 4,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 时间戳\n",
    "time.time()/60/60/24/365"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "id": "f094d3a6",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "'21:23'"
      ]
     },
     "execution_count": 2,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "time.strftime(\"%H:%M\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "id": "37d79dec",
   "metadata": {},
   "outputs": [],
   "source": [
    "time.sleep(2)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "id": "92121d26",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Help on built-in function gmtime in module time:\n",
      "\n",
      "gmtime(...)\n",
      "    gmtime([seconds]) -> (tm_year, tm_mon, tm_mday, tm_hour, tm_min,\n",
      "                           tm_sec, tm_wday, tm_yday, tm_isdst)\n",
      "    \n",
      "    Convert seconds since the Epoch to a time tuple expressing UTC (a.k.a.\n",
      "    GMT).  When 'seconds' is not passed in, convert the current time instead.\n",
      "    \n",
      "    If the platform supports the tm_gmtoff and tm_zone, they are available as\n",
      "    attributes only.\n",
      "\n"
     ]
    }
   ],
   "source": [
    "help(time.gmtime)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "id": "7cd0f130",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "time.struct_time(tm_year=2023, tm_mon=11, tm_mday=12, tm_hour=13, tm_min=25, tm_sec=24, tm_wday=6, tm_yday=316, tm_isdst=0)"
      ]
     },
     "execution_count": 5,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "time.gmtime()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "4ca9cc34",
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "1f5050bc",
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "bd3bce7d",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.11.5"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
